Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2RedDotReceiving = require("RedDotReceiving");
var $2GameUser = require("GameUser");
var $2EventCenter = require("EventCenter");
var $2EventDefine = require("EventDefine");
var def_RedDotManager = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
    _ctor.instance = this;
  }
  return babel_createClass(_ctor, [{
    key: "syncRedDotStateByType",
    value: function syncRedDotStateByType(e) {
      switch (e) {
        case $2RedDotReceiving.eRedDotType.Collection:
          this.syncCollectionState();
          break;
        case $2RedDotReceiving.eRedDotType.Desktop:
          this.syncAddDesktopState();
          break;
        case $2RedDotReceiving.eRedDotType.Sidebar:
          this.syncSideBarState();
      }
    }
  }, {
    key: "syncCollectionState",
    value: function syncCollectionState() {
      var e = false;
      e = false === $2GameUser.default.getInstance().getCollectedState() || !$2GameUser.default.getInstance().getCollectionRewardClaimState();
      var t = {
        type: $2RedDotReceiving.eRedDotType.Collection,
        display: e
      };
      $2EventCenter.default.postEvent($2EventDefine.default.GAME_RED_DOT_NOTIFY, t);
    }
  }, {
    key: "syncAddDesktopState",
    value: function syncAddDesktopState() {
      var e = false;
      e = false === $2GameUser.default.getInstance().getAddDesktopState() || !$2GameUser.default.getInstance().getDesktopDailyRewardClaimState();
      var t = {
        type: $2RedDotReceiving.eRedDotType.Desktop,
        display: e
      };
      $2EventCenter.default.postEvent($2EventDefine.default.GAME_RED_DOT_NOTIFY, t);
    }
  }, {
    key: "syncSideBarState",
    value: function syncSideBarState() {
      var e = false;
      e = false === $2GameUser.default.getInstance().getSidebarRewardClaimState();
      var t = {
        type: $2RedDotReceiving.eRedDotType.Sidebar,
        display: e
      };
      $2EventCenter.default.postEvent($2EventDefine.default.GAME_RED_DOT_NOTIFY, t);
    }
  }], [{
    key: "Instance",
    get() {
      this.instance || (this.instance = new _ctor());
      return this.instance;
    }
  }]);
}();
exports.default = def_RedDotManager;